<div class="main-wrap">

    <div class="crumb-wrap">
        <div class="crumb-list"><i class="icon-font"></i><a href="index.html">常用操作</a><span class="crumb-step">&gt;</span><span class="crumb-name">商品管理</span></div>
    </div>
    <div class="search-wrap">
        <div class="search-content">
            <form action="" method="post">
                <table class="search-tab">
                    <tr>
                        <th width="120">商品级别:</th>
                        <td>{:frm_out_put($sortarr,'sort','option',$query['sort'],'','-请选择-')}</td>
                        <th width="120">搜索类型:</th>
                        <td>
                            <select name="type" id="">
                                <option value="-1" <if condition="$query['type'] eq -1">selected="selected"</if> >全部</option>
                                <option value="1" <if condition="$query['type'] eq 1">selected="selected"</if> >商品码</option>
                                <option value="2" <if condition="$query['type'] eq 2">selected="selected"</if> >标题</option>
                            </select>
                        </td>
                        <th width="70">关键字:</th>
                        <td><input class="common-text" placeholder="关键字" name="keywords" value="{$query['keywords']}" id="" type="text"></td>
                        <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
    <div class="result-wrap">
        <form name="myform" id="myform" method="post">
            <if condition="$isAdmin eq true">
                <div class="result-title">
                    <div class="result-list">
                        <a href="{:U('Admin/Goods/set')}"><i class="icon-font"></i>新增商品</a>
                        <!-- <a id="batchDel" href="javascript:void(0)"><i class="icon-font"></i>批量删除</a> -->
                        <a href="{:U('Admin/Goods/export',array('parameters'=>json_encode($query)))}" target="_blank"><i class="icon-font">&#xe005;</i>导出</a>
                        <!--  <a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a> -->
                    </div>
                </div>
            </if>
            <div class="result-content">
                <table class="result-tab" width="100%">
                    <tr>
                        <th class="tc" width="5%"><input class="allChoose" name="" type="checkbox"></th>
                        <th>ID</th>
                        <th>商品码</th>
                        <th>标题</th>
                        <th>市场价</th>
                        <th>联通商城价</th>
                        <th>分类</th>
                        <th>状态</th>
                        <th width="10%">发布时间</th>
                        <if condition="$isAdmin eq true">
                            <th>操作</th>
                        </if>
                    </tr>
                    <volist id="vo" name="list">
                    <tr>
                        <td class="tc"><input name="id[]" value="59" type="checkbox" value="{$vo.id}"></td>
                        <td>{$vo.id}</td>
                        <td>{$vo.sncode}</td>
                        <td><a target="_blank" href="{:U('Home/Index/detail',array('code'=>$vo[sncode]))}" title="{$vo.title}">{$vo.title}</a>
                        </td>
                       	<td>￥{$vo.price}</td>
                       	<td>￥{$vo.saleprice}</td>
                       	<td>{$sortarr[$vo['sort']]}</td>
                       	<td>
                        <php>
                            if($vo['status']){
                                echo "<span class='blue'>未领取</span>";
                            }else{
                                echo "<span class='red'>已领取</span>";
                            }    
                        </php>
                        </td>
                       	
                       	<td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
                        <if condition="$isAdmin eq true">
                        <td>
                            <a class="link-update mr10" href="{:U('Home/Index/detail',array('code'=>$vo[sncode]))}" target="_blank">预览</a>
                            <!--<a class="link-update mr10" href="{:U('Goods/edit',array('id'=>$vo[id]))}">修改</a>-->
                            <a class="link-del mr10" href="{:U('Goods/del',array('id'=>$vo[id]))}">删除</a>
                            <a class="link-clone" style="cursor: pointer;" href="{:U('Goods/clone1',array('id'=>$vo[id],'num'=>'var'))}">克隆</a>
                        </td>
                        </if>
                    </tr>
              		</volist>
                </table>
                <div class="list-page"> {$page}</div>
            </div>
        </form>
        <!--克隆提交的表单-->
        <!--<form id="clone_form" action="{:U('Goods/clone1')}" method="get">
            <input type="hidden" name="id" value=""/>
            <input type="hidden" name="num" value=""/>
        </form>-->
    </div>
</div>